﻿
using OpenCvSharp;

namespace Xc.DataAccess.CodeReader.Models
{
    public class CVPoint: CVPointBase<int>
    {
        public static implicit operator Point(CVPoint cVPoint)
        {
            if (cVPoint==null)
            {
                return new Point();
            }
            return new Point { X = cVPoint.X, Y = cVPoint.Y };
        }
    }
    /// <summary>
    /// 点抽象类
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public abstract class CVPointBase<T>
    {
        public T X { get; set; }
        public T Y { get; set; }
    }
}
